home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1983-12-17 | 5.1 KB | 184 lines |
- 10 ' This program demonstrates the NicePrint features
- 20 '
- 30 CLS
- 40 PRINT "NicePrint demonstration program"
- 50 PRINT
- 60 PRINT "If you have not already done so,"
- 70 PRINT "load one of the NicePrint COM files"
- 80 PRINT "(by typing its name in DOS)."
- 90 PRINT
- 100 PRINT "This program will type out "
- 110 PRINT "samples of the NicePrint features"
- 120 PRINT "in NICE mode, and then print out"
- 130 PRINT "the same text in normal mode."
- 140 PRINT
- 150 PRINT
- 160 PRINT
- 170 PRINT "Now ready the printer and press"
- 180 PRINT "F1 if you have an EPSON or IBM"
- 190 PRINT "graphics printer and loaded NICE,"
- 200 PRINT "NICENSML, or NICENWID; or press"
- 210 PRINT "F2 if you have a GEMINI and loaded"
- 220 PRINT "GNICE, GNICEWID, or GNICESML"
- 230 GEMINI = -1
- 240 KEY(1) ON:KEY(2) ON
- 250 ON KEY(1) GOSUB 12000
- 260 ON KEY(2) GOSUB 13000
- 270 IF GEMINI<>-1 THEN 290
- 280 GOTO 270
- 290 OPEN "lpt1:" AS #1
- 295 PRINT#1,CHR$(27);"@";: 'RESET PRINTER
- 300 FOR QUAL = 0 TO 1 :' repeat in low-quality mode
- 310 '
- 320 PRINT #1,CHR$(27);"x2":' set serif roman style
- 330 '
- 340 GOSUB 1000: ' print out all pitches
- 350 PRINT #1," "
- 360 GOSUB 2000: ' print out all character styles
- 370 '
- 380 PRINT #1,CHR$(27);"4";:' NOW SET ITALIC MODE
- 390 GOSUB 2000: ' print all character styles italicized
- 400 '
- 410 PRINT #1,CHR$(27);"5";: ' clear italic mode
- 420 '
- 425 PRINT #1,CHR$(27);"x2"; : ' set back to first style
- 426 '
- 430 PRINT#1," ":PRINT#1," ":GOSUB 8000 : ' print out feature sample
- 431 '
- 432 PRINT #1,CHR$(12);: ' page eject
- 433 '
- 434 PRINT #1,CHR$(27);"xB";: ' select BIG mode
- 435 '
- 436 GOSUB 8000 : ' print out sample in BIG mode
- 437 '
- 438 PRINT #1,CHR$(27);"xN";: ' cancel BIG mode
- 439 '
- 440 PRINT #1," ";: ' skip a space
- 441 '
- 450 PRINT #1,"International characters:"
- 460 GOSUB 3000
- 470 '
- 480 PRINT #1,CHR$(27);"x1";: 'disable NicePrint
- 490 PRINT #1,CHR$(12);:' PAGE EJECT
- 500 NEXT QUAL
- 510 CLS
- 520 PRINT "Now type Ctrl-Alt-F10 to do a page"
- 530 PRINT "eject on the printer, and then type"
- 540 PRINT "Ctrl-Alt-F2 to restore the NICE "
- 550 PRINT "printing capability."
- 560 PRINT
- 570 PRINT "If you do not type Ctrl-Alt-F2,"
- 580 PRINT "then the printer will behave like"
- 590 PRINT "its usual self and not print out"
- 600 PRINT "NICE characters.
- 610 PRINT
- 620 PRINT
- 630 PRINT
- 640 STOP
- 1000 ' This subroutine prints out samples of all six pitchs
- 1010 '
- 1020 PITCH = 1:GOSUB 9000:' set Pica
- 1030 PRINT#1,"Standard Pica"
- 1040 '
- 1050 PITCH = 2:GOSUB 9000: ' set Elite
- 1060 PRINT#1,"Standard Elite"
- 1070 '
- 1080 PITCH = 3:GOSUB 9000:' set Condensed
- 1090 PRINT#1,"Standard Condensed"
- 1100 '
- 1110 PITCH = 4:GOSUB 9000: ' set Pica Enlarged
- 1120 PRINT#1,"Enlarged Pica"
- 1130 '
- 1140 PITCH = 5:GOSUB 9000: ' set Elite Enlarged
- 1150 PRINT #1,"Enlarged Elite"
- 1160 '
- 1170 PITCH = 6:GOSUB 9000: ' set Condensed Enlarged
- 1180 PRINT #1,"Condensed Enlarged"
- 1190 '
- 1200 PITCH = 1:GOSUB 9000:' return to Pica
- 1210 RETURN
- 1220 '
- 2000 ' This subroutine prints out all the character sets
- 2010 '
- 2020 FOR STYLE = 2 TO 7: ' all six NicePrint character styles
- 2030 '
- 2040 PRINT #1,CHR$(27);"x";CHR$(STYLE);: ' set style -- may also say
- 2050 ' chr$(27);"x2"
- 2060 FOR CHAR = 32 TO 90
- 2070 PRINT #1,CHR$(CHAR);
- 2080 NEXT CHAR
- 2090 PRINT #1," "
- 2100 FOR CHAR = 91 TO 126
- 2110 PRINT #1,CHR$(CHAR);
- 2120 NEXT CHAR
- 2130 PRINT #1," "
- 2140 NEXT STYLE
- 2150 RETURN
- 2160 '
- 3000 ' print out all 8 international character sets
- 3010 '
- 3020 PITCH = 3:GOSUB 9000:' Condensed pitch
- 3030 WIDTH#1, 132
- 3040 FOR R = 0 TO 8 : ' Eight international sets
- 3050 IF GEMINI = 1 THEN PRINT#1,CHR$(27);"7";CHR$(R);:' set for GEMINI
- 3060 IF GEMINI = 0 THEN PRINT#1,CHR$(27);"R";CHR$(R);:' set for IBM/EPSON
- 3070 '
- 3080 FOR CHAR = 32 TO 126
- 3090 PRINT #1,CHR$(CHAR);
- 3100 NEXT CHAR
- 3110 PRINT #1," "
- 3120 NEXT R
- 3121 IF GEMINI = 1 THEN PRINT#1,CHR$(27);"7";CHR$(0);: ' set normal
- 3122 IF GEMINI = 0 THEN PRINT#1,CHR$(27);"R";CHR$(0);
- 3130 RETURN
- 3140 '
- 8000 ' This subroutine prints out the line of subroutine 10000 in all
- 8010 ' possible pitches.
- 8020 '
- 8030 FOR PITCH = 1 TO 6
- 8035 IF PITCH<4 THEN WIDTH#1,96 ELSE WIDTH#1,48
- 8040 GOSUB 9000: ' set pitch
- 8050 GOSUB 10000:' print line
- 8060 NEXT PITCH
- 8070 RETURN
- 8080 '
- 9000 ' This subroutine sets the pitch. IBM/EPSON commands to set the pitch
- 9010 ' are different from GEMINI commands to set the pitch.
- 9020 '
- 9030 IF GEMINI = 1 THEN 9500
- 9040 '
- 9050 ' IBM/EPSON pitch setting commands
- 9060 '
- 9070 PRINT #1,CHR$(27);"W";CHR$(0);: ' make sure enlarged mode is cleared
- 9080 PRINT #1,CHR$(18);: ' make sure condensed mode is cleared
- 9085 PRINT#1,CHR$(27);"P";:' set pitch to pica to avoid mode conflict
- 9090 IF (PITCH=1) OR (PITCH=4) THEN PRINT#1,CHR$(27);"P";:' Pica
- 9100 IF (PITCH=2) OR (PITCH=5) THEN PRINT#1,CHR$(27);"M";:' Elite
- 9110 IF (PITCH=3) OR (PITCH=6) THEN PRINT#1,CHR$(15); :' Condensed
- 9120 '
- 9130 IF PITCH>3 THEN PRINT#1,CHR$(27);"W";CHR$(1);:' set enlarged mode
- 9140 '
- 9150 RETURN : ' End of IBM/EPSON pitch set
- 9160 '
- 9500 ' GEMINI pitch set commands
- 9510 PRINT#1,CHR$(27);"W";CHR$(0);: ' make sure enlarged mode is cleared
- 9520 '
- 9530 P2 = PITCH:IF P2>3 THEN P2 = P2 - 3
- 9540 PRINT #1,CHR$(27);"B";CHR$(P2);:' 1=Pica, 2=Elite, 3=Condensed
- 9550 '
- 9560 IF PITCH>3 THEN PRINT#1,CHR$(27);"W";CHR$(1); : ' set enlarged mode
- 9570 RETURN
- 9580 '
- 10000 ' This subroutine prints out a line with superscripts, subscripts
- 10001 ' and italics in it.
- 10002 ' It is the same for EPSON, IBM, and GEMINI
- 10003 '
- 10010 PRINT #1,"This";CHR$(27);"E test line";CHR$(27);"F contains SUPER";
- 10020 PRINT #1,CHR$(27);"S";CHR$(0);"SCRIPTS";CHR$(27);"T";",";
- 10030 PRINT #1,CHR$(27);"S";CHR$(1);" sub";CHR$(27);"T";"scripts, ";
- 10040 PRINT #1,CHR$(27);"-";CHR$(1);"underlining";CHR$(27);"-";CHR$(0);", ";
- 10050 PRINT #1,"and ";CHR$(27);"4";"ITALICS";CHR$(27);"5"
- 10060 RETURN
- 12000 GEMINI = 0:KEY(1) OFF:KEY(2) OFF:RETURN
- 13000 GEMINI = 1:KEY(1) OFF:KEY(2) OFF:RETURN
-